#ifndef OPT_GEN_H
#define OPT_GEN_H



#include "ir.h"



/* Define the possible code generation backends supported */
#define GEN_BACKEND_TYPE_C 1
#define GEN_BACKEND_TYPE_I386_ASM 2
#define GEN_BACKEND_TYPE_MIPS_ASM 3
#define GEN_BACKEND_TYPE_SPARC_ASM 4

/* Unknown primitive types should be flagged with an invalid size */
#define GEN_BACKEND_PRIMITIVE_TYPE_SIZE_UNKNOWN -1

FILE *gen_fd;
void gen_init();
void gen(struct ir_list_t *ir_list);
void gen_write(char *string);
void gen_compute_offsets();
long gen_primitive_size(char *primitive_type);


#endif /* OPT_GEN_H */
